package com.example.client;


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;


public class UploadRequest {
    @JsonCreator
    public UploadRequest(@JsonProperty("path") String path,
                   @JsonProperty("filename") String filename,
                   @JsonProperty("contentType") String contentType,
                   @JsonProperty("md5") String md5,
                   @JsonProperty("partCount") Integer partCount, @JsonProperty("chunkIndex") Integer chunkIndex) {
        this.path = path;
        this.filename = filename;
        this.contentType = contentType;
        this.md5 = md5;
        this.partCount = partCount;
        this.chunkIndex = chunkIndex;
    }

    private String path;

    private String filename;

    private String contentType;

    private String md5;

    private int partCount;

    private int chunkIndex;

    @Override
    public String toString() {
        return "{" +
                "\"path\":" + "\"" + path + "\"" +  "," +
                "\"filename\":" + "\"" + filename + "\"" +  "," +
                "\"contentType\":" + "\"" + contentType + "\"" +  "," +
                "\"md5\":" + "\"" + md5 + "\"" +  "," +
                "\"partCount\":" + "\"" + partCount + "\"" +  "," +
                "\"chunkIndex\":" + "\"" + chunkIndex + "\"" +
                '}';
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public int getPartCount() {
        return partCount;
    }

    public void setPartCount(int partCount) {
        this.partCount = partCount;
    }

    public int getChunkIndex() {
        return chunkIndex;
    }

    public void setChunkIndex(int chunkIndex) {
        this.chunkIndex = chunkIndex;
    }
}

